package com.cloud.service.file;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cloud.domain.file.Folder;
import com.cloud.param.file.FolderParam;
import com.cloud.param.file.ResourceParam;
import com.common.utils.tools.result.ServiceResult;

import java.io.IOException;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author liuyuan
 * @since 2019-09-23
 */
public interface FolderService extends IService<Folder> {

    /**
     * 创建文件夹
     * */
    Boolean mkdirFolder(Folder fromFolder);

    /**
     * 修改文件夹名称
     * */
    Boolean rename(Folder fromFolder);
    /**
     * 删除文件
     * */
    Boolean deleteFile(Long id);

    ServiceResult upload(ResourceParam resourceParam) throws IOException;

    IPage<Folder> listChildrenFileByPage(FolderParam folderParam);

    IPage<Folder> getParentFolderByPage(FolderParam folderParam);
}
